package com.fengniu.ejb.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "CouponItemTable", schema = "FENGNIU", uniqueConstraints = {})
@NamedQueries( {
		@NamedQuery(name = "CouponDao.eql.findCouponItemByItemId", query = "SELECT g FROM CouponItem g WHERE g.couponItemId=:couponItemId"),
		@NamedQuery(name = "CouponDao.eql.updateCouponItemLotteryNumbers", query = "UPDATE CouponItem ci set ci.lotteryNumber0=:lotteryNumber0,ci.lotteryNumber1=:lotteryNumber1,ci.lotteryNumber2=:lotteryNumber2,ci.lotteryNumber3=:lotteryNumber3,ci.lotteryNumber4=:lotteryNumber4,ci.lotteryNumber5=:lotteryNumber5,ci.lotteryNumber6=:lotteryNumber6,ci.lotteryNumber7=:lotteryNumber7,ci.lotteryNumber8=:lotteryNumber8,ci.lotteryNumber9=:lotteryNumber9 WHERE sysId=:sysId") })
public class CouponItem extends GeneEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7537121909790227124L;

	@Column(nullable = false, unique = true, updatable = false)
	private String couponItemId;

	private Long issueId; // 抽奖期号

	private String lotteryNumber0;

	private String lotteryNumber1;// 抽奖号码

	private String lotteryNumber2;

	private String lotteryNumber3;

	private String lotteryNumber4;

	private String lotteryNumber5;

	private String lotteryNumber6;

	private String lotteryNumber7;

	private String lotteryNumber8;

	private String lotteryNumber9;

	@ManyToOne
	Content coupon; // coupon

	@ManyToOne
	User user; // 抽奖人

	@Transient
	Site site;

	public String getCouponItemId() {
		return couponItemId;
	}

	public String getLotteryNumber0() {
		return lotteryNumber0;
	}

	public void setLotteryNumber0(String lotteryNumber0) {
		this.lotteryNumber0 = lotteryNumber0;
	}

	public String getLotteryNumber6() {
		return lotteryNumber6;
	}

	public void setLotteryNumber6(String lotteryNumber6) {
		this.lotteryNumber6 = lotteryNumber6;
	}

	public String getLotteryNumber7() {
		return lotteryNumber7;
	}

	public void setLotteryNumber7(String lotteryNumber7) {
		this.lotteryNumber7 = lotteryNumber7;
	}

	public String getLotteryNumber8() {
		return lotteryNumber8;
	}

	public void setLotteryNumber8(String lotteryNumber8) {
		this.lotteryNumber8 = lotteryNumber8;
	}

	public String getLotteryNumber9() {
		return lotteryNumber9;
	}

	public void setLotteryNumber9(String lotteryNumber9) {
		this.lotteryNumber9 = lotteryNumber9;
	}

	public void setCouponItemId(String couponItemId) {
		this.couponItemId = couponItemId;
	}

	public String getLotteryNumber1() {
		return lotteryNumber1;
	}

	public void setLotteryNumber1(String lotteryNumber1) {
		this.lotteryNumber1 = lotteryNumber1;
	}

	public String getLotteryNumber2() {
		return lotteryNumber2;
	}

	public void setLotteryNumber2(String lotteryNumber2) {
		this.lotteryNumber2 = lotteryNumber2;
	}

	public String getLotteryNumber3() {
		return lotteryNumber3;
	}

	public void setLotteryNumber3(String lotteryNumber3) {
		this.lotteryNumber3 = lotteryNumber3;
	}

	public String getLotteryNumber4() {
		return lotteryNumber4;
	}

	public void setLotteryNumber4(String lotteryNumber4) {
		this.lotteryNumber4 = lotteryNumber4;
	}

	public String getLotteryNumber5() {
		return lotteryNumber5;
	}

	public void setLotteryNumber5(String lotteryNumber5) {
		this.lotteryNumber5 = lotteryNumber5;
	}

	public Content getCoupon() {
		return coupon;
	}

	public void setCoupon(Content coupon) {
		this.coupon = coupon;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Long getIssueId() {
		return issueId;
	}

	public void setIssueId(Long issueId) {
		this.issueId = issueId;
	}

	public Site getSite() {
		return site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

}
